package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbCpuStandard;
import com.glsc.ngateway.common.base.dto.cmdb.CmdbCpuStandardImportDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CmdbCpuStandardMapper {
    CmdbCpuStandardMapper INSTANCE = Mappers.getMapper(CmdbCpuStandardMapper.class);

    CmdbCpuStandardImportDto domain2dto(CmdbCpuStandard cmdbCpuStandard);

    List<CmdbCpuStandardImportDto> domain2dto(List<CmdbCpuStandard> cmdbCpuStandards);

    @Mapping(target = "id", ignore = true)
    @Mapping(target = "cpuStandardCode", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    CmdbCpuStandard dto2domain(CmdbCpuStandardImportDto cmdbCpuStandardImportDto);

    List<CmdbCpuStandard> dto2domain(List<CmdbCpuStandardImportDto> cmdbCpuStandardImportDtos);

}
